
package za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Interpreter.Model;

import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Interpreter.Model.Expression;
import java.util.Map;

public class Varible implements Expression 
{
    private String name;

    public Varible(String name) { this.name = name; }


    @Override
    public int interpret(Map<String, Expression> varibles) 
    {
        if( varibles.get(name) == null)
            return 0;
        return varibles.get(name).interpret(varibles);
    }   
}